<%-- 
    Document   : ConsulteAbsence
    Created on : 4 déc. 2013, 18:12:48
    Author     : Frantz
--%>
<%@page import="Objet.Absence"%>
<%@page import="java.util.ArrayList"%>
<%@page import="Objet.Secretaire"%>
<%@page import="java.util.Iterator"%>
<%@page import="Objet.Module"%>
<%@page import="Objet.Enseignant"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        
        <jsp:useBean id="co" scope="request" class="Objet.QueryBD"/>
        <jsp:useBean id="FormSec" scope="request" class="Form.SecretaireForm"/>
        <jsp:useBean id="monAuth" scope="request" class="Form.FirstActionForm"/>
        <h1>En dev de l'affichage de toute les absences !</h1>
        
        <!--%
            Secretaire monSecretaire = co.creerSecretaire
                    ((String)monAuth.getLogin(),(String)monAuth.getMdp());
        %-->
     
        
        
              <%/*
                
                Iterator<Absence> monIt = (monSecretaire.getList()).iterator();
                   while(monIt.hasNext())
                    {
                        Module ModCour = monIt.next();
                        out.println("<tr><td>" +  ModCour.getModule()
                                +"</td><td>"+  ModCour.getLibellé());
                    }
                
            */%>
            
            

        <form method="POST" action="UpdateActionForm.do">
            <center><h1>Mes Notes</h1>
            <table border ="1">
                <tr>
                    <th>Eleves</th>
                    <th>Notes</th>
                </tr>
            <%
                ArrayList<Absence> ListAbsence = 
                        new ArrayList(co.lesAbsence(FormSec.getAction()));
                
                Iterator<Absence> monIt = ListAbsence.iterator();
                int i=1;
                while(monIt.hasNext())
                    {
                        Absence maNote = monIt.next();
                        out.println("<tr>"
                                + "<td>"
                                    + "<input type='hidden' "
                                    + "name='netudiant"+i+"' "
                                    + "value='"+maNote.getNetudiant()+"'>"
                                    + maNote.getNetudiant()
                                + "</td>"
                                + "<td>"
                                    + "<input type='text'"
                                    + " name='note"+i+"'"
                                    + " value='"+maNote.()+"'>"
                                + "</td>" );
                        i++;
                    }
                    out.println("<input type='hidden' name='i' value='"+i+"'>");
            %>
            </table>
            </center>
        </form>
</html>

    </body>
</html>
